package dome1;

import java.util.Date;
import static java.lang.Math.*;
public class Text {
    public static void main(String[] args) {
        {
            int x = 10;
            System.out.println("x1 = " + x);
        }
        int x = 200;
        System.out.println("x2 = " + x);
    }
    public static void main4(String[] args) {
        double a = 30;
        double b = 30;
        //double c = Math.sqrt(Math.pow(a,2) + Math.pow(b,2));
        double c =  sqrt(pow(a,2) + pow(b,2));
        System.out.printf("c = %.2f\n",c);
    }
    public static void main3(String[] args) {
        Date date = new Date();
        System.out.println(date.getTime());
    }
    public static void main2(String[] args) {
        java.util.Date date = new java.util.Date();
        System.out.println(date.getTime());
    }
    public static void main1(String[] args) {
        Date date1 = new Date();
        Date date2 = new Date(2024,9,14);
    }
}


//class Date {
//    public int year = 2024;
//    public int month = 9;
//    public int day = 14;
//
//    //无参构造方法
//    public Date() {
//        this.year = 2024;
//        this.month = 9;
//        this.day = 14;
//    }
//
//    //带有三个参数的构造方法
//    public Date(int year, int month, int day) {
//        this.year = year;
//        this.month = month;
//        this.day = day;
//    }
//}